import request from "@/utils/request";

export function storage_index(params) {
  return request({
    url: "/inventory/index",
    method: "get",
    params
  });
}

// 修改单挑数据
export function storage_update(params) {
  return request({
    url: "inventory/changeField",
    method: "post",
    params
  });
}

// 修改记录
export function storage_log(params) {
  return request({
    url: "inventoryLog/index",
    method: "get",
    params
  });
}

// 导出
export function export_storage_now(params) {
  return request({
    url: "export/kun_now",
    method: "post",
    responseType: "blob",
    params
  });
}

// 区库管理分类列表
export function reservoir_index(params) {
  return request({
    url: "reservoir/index",
    method: "get",
    params
  });
}
// 区库管理分类添加
export function reservoir_add(params) {
  return request({
    url: "reservoir/add",
    method: "post",
    params
  });
}
// 区库管理分类编辑
export function reservoir_edit(params) {
  return request({
    url: "reservoir/edit",
    method: "post",
    params
  });
}
// 区库管理分类删除
export function reservoir_del(params) {
  return request({
    url: "reservoir/delete",
    method: "post",
    params
  });
}

// 库存库区编辑编辑
export function change_Field(params) {
  return request({
    url: "inventory/changeField",
    method: "post",
    params
  });
}

// 获取转换详情
export function unit_changeData(params) {
  return request({
    url: "inventory/unitChangeData",
    method: "get",
    params
  });
}

// 单位转换
export function unit_change(data) {
  return request({
    url: "inventory/unitChange",
    method: "post",
    data
  });
}